package com.anosine.gpsl.android.util;

import android.content.Context;
import android.util.DisplayMetrics;
import android.view.WindowManager;
/**
 * @Title: FontSize
 * @Package com.anosine.gpsl.android.util
 * @Description: 
 * @author: sunny
 * @date: 2015-11-19
 * @version V1.0
 */
public class FontSize {
	
	public static  int getFontSize(Context context,int textSize){
		DisplayMetrics  dm=new DisplayMetrics();
		WindowManager windowManager=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
		windowManager.getDefaultDisplay().getMetrics(dm);
		int  screenHeight=dm.heightPixels;
		int rate=(int)((textSize)*(float)screenHeight/1280);
		return rate;
	}
}
